/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.io.Serializable;
public class Trp_provincia implements Serializable {
	public Trp_provincia() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == orm.ORMConstants.KEY_TRP_PROVINCIA_TRP_COLEGIO) {
			return ORM_trp_colegio;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == orm.ORMConstants.KEY_TRP_PROVINCIA_REGION) {
			this.region = (orm.Trp_region) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int pr_id_prov;
	
	private String pr_des_prov;
	
	private orm.Trp_region region;
	
	private java.util.Set ORM_trp_colegio = new java.util.HashSet();
	
	private void setPr_id_prov(int value) {
		this.pr_id_prov = value;
	}
	
	public int getPr_id_prov() {
		return pr_id_prov;
	}
	
	public int getORMID() {
		return getPr_id_prov();
	}
	
	public void setPr_des_prov(String value) {
		this.pr_des_prov = value;
	}
	
	public String getPr_des_prov() {
		return pr_des_prov;
	}
	
	public void setRegion(orm.Trp_region value) {
		if (region != null) {
			region.trp_provincia.remove(this);
		}
		if (value != null) {
			value.trp_provincia.add(this);
		}
	}
	
	public orm.Trp_region getRegion() {
		return region;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Region(orm.Trp_region value) {
		this.region = value;
	}
	
	private orm.Trp_region getORM_Region() {
		return region;
	}
	
	private void setORM_Trp_colegio(java.util.Set value) {
		this.ORM_trp_colegio = value;
	}
	
	private java.util.Set getORM_Trp_colegio() {
		return ORM_trp_colegio;
	}
	
	public final orm.Trp_colegioSetCollection trp_colegio = new orm.Trp_colegioSetCollection(this, _ormAdapter, orm.ORMConstants.KEY_TRP_PROVINCIA_TRP_COLEGIO, orm.ORMConstants.KEY_TRP_COLEGIO_PROVINCIA, orm.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getPr_id_prov());
	}
	
}
